<html data-layout-decorator="layout/main">
    <div data-layout-fragment="content">

        <!-- 表格工具栏 -->
        <form class="layui-form toolbar">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <input type="text" name="name" id="keywords" placeholder="请输入菜单名称" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline" style="width: auto;">
                        <button class="layui-btn" lay-submit="" lay-filter="searchForm" id="search"><i class="layui-icon">&#xe615;</i>查询</button>
                        <a href="javascript:" class="layui-btn btnOption  layui-btn-small btnAdd" id="add" data-param='[]' lay-event="add">
                            <i class="layui-icon layui-icon-add-1"></i> 添加菜单</a>
                        <a href="javascript:" class="layui-btn btnOption layui-btn-normal layui-btn-small btnExpand" id="expand" data-param='[]' lay-event="expand">
                            <i class="layui-icon layui-icon-shrink-right"></i> 全部展开</a>
                        <a href="javascript:" class="layui-btn btnOption layui-btn-warm layui-btn-small btnCollapse" id="collapse" data-param='[]' lay-event="collapse">
                            <i class="layui-icon layui-icon-spread-left"></i> 全部折叠</a>
                    </div>
                </div>
            </div>
        </form>

        <!-- 数据表格 -->
        <table class="layui-hide" id="tableList" lay-filter="tableList"></table>

        <!-- 表格操作列 -->
        <script type="text/html" id="toolBar">
            <a class="layui-btn layui-btn-xs btnEdit" lay-event="edit" title="编辑"><i class="layui-icon">&#xe642;</i>编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs btnDel" lay-event="del" title="删除"><i class="layui-icon">&#xe640;</i>删除</a>
            {{#  if(d.type < 4){ }}
            <a class="layui-btn layui-btn-xs layui-btn-normal btnAdd2" lay-event="add"><i class="layui-icon">&#xe654;</i>添加</a>
            {{#  } }}
        </script>

        <!-- 状态 -->
        <script type="text/html" id="statusTpl">
            <input type="checkbox" name="status" value="{{ d.id }}" lay-skin="switch" lay-text="显示|不显示" lay-filter="status" {{ d.status == 1 ? 'checked' : '' }} >
        </script>
    </div>
</html>